package com.zhongxi.guoyuan.utils;

import org.json.JSONArray;
import org.json.JSONException;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/3/21.
 */

public class JsonUtils {

    public static List<String> getData(JSONArray obj){
        List<String> stringList = new ArrayList<>();
        try {
            for(int i=0;i<obj.length();i++){
                stringList.add(i, obj.getString(i));
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        return stringList;
    }
}
